package parser

import (
	"regexp"
	"strings"
)

func GetTableName(tableName string) string {
	if strings.Contains(tableName, ".") {
		tableName = strings.Split(tableName, ".")[1]
	}
	re := regexp.MustCompile(`_\d+$`)
	return re.ReplaceAllString(tableName, "")
}
